package cn.tedu.collection;

import java.util.concurrent.CopyOnWriteArrayList;

public class CopyOnWriteArrayListTests {
    public static void main(String[] args) {
        CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();
        list.add("A");
        list.add("B");
        list.add("C");
        list.add("D");
        System.out.println(list.get(0));
        //频繁写操作效率会比较低
    }
}
